{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4a3fc134",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "a517df6e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143, 120, 135],\n",
       "       [ 90, 147,  98],\n",
       "       [127, 140, 135],\n",
       "       [ 98, 130, 100],\n",
       "       [134,  95, 144],\n",
       "       [132, 109, 134],\n",
       "       [129,  94, 100],\n",
       "       [134, 134, 121],\n",
       "       [113,  96, 147],\n",
       "       [105, 142, 111],\n",
       "       [147, 106, 146],\n",
       "       [144, 113, 118],\n",
       "       [117, 119, 149],\n",
       "       [105, 125, 104],\n",
       "       [105, 127,  96],\n",
       "       [145, 126, 108],\n",
       "       [130, 135,  92],\n",
       "       [117, 149, 125],\n",
       "       [142, 106, 136],\n",
       "       [139, 149, 108],\n",
       "       [116,  97, 112],\n",
       "       [144, 137,  98],\n",
       "       [143, 143,  98],\n",
       "       [109, 111, 124],\n",
       "       [140, 125, 133],\n",
       "       [109, 105, 136],\n",
       "       [130,  97, 108],\n",
       "       [142, 116, 103],\n",
       "       [104, 117, 119],\n",
       "       [138, 136, 124],\n",
       "       [147, 134, 132],\n",
       "       [114,  92,  91],\n",
       "       [105,  96,  92],\n",
       "       [ 96, 112, 104],\n",
       "       [146, 129, 106],\n",
       "       [148, 145, 129],\n",
       "       [ 94,  96, 129],\n",
       "       [118, 127, 140],\n",
       "       [108, 118, 125],\n",
       "       [120, 115, 130],\n",
       "       [144, 121, 143],\n",
       "       [133, 121, 117],\n",
       "       [134, 116, 141],\n",
       "       [136,  96, 141],\n",
       "       [111, 143, 100],\n",
       "       [117,  96,  94],\n",
       "       [109, 137, 124],\n",
       "       [117, 131, 139],\n",
       "       [ 95, 133, 119],\n",
       "       [138, 127, 114],\n",
       "       [136, 140,  92],\n",
       "       [134, 132, 108],\n",
       "       [115,  92, 102],\n",
       "       [104, 113, 112],\n",
       "       [149, 108, 137],\n",
       "       [135, 118, 128],\n",
       "       [136, 144,  98],\n",
       "       [138, 138,  97],\n",
       "       [103, 101, 103],\n",
       "       [106,  92,  97],\n",
       "       [133,  98, 141],\n",
       "       [106, 136, 141],\n",
       "       [149, 137, 122],\n",
       "       [143, 144,  91],\n",
       "       [ 96,  99, 136],\n",
       "       [ 93, 138, 132],\n",
       "       [110,  98, 104],\n",
       "       [101, 116, 134],\n",
       "       [147, 138, 134],\n",
       "       [ 95, 139, 105],\n",
       "       [127,  90, 120],\n",
       "       [ 98, 108, 108],\n",
       "       [124, 116,  91],\n",
       "       [141,  93,  97],\n",
       "       [125, 109,  93],\n",
       "       [114, 144, 110],\n",
       "       [119, 107, 130],\n",
       "       [136, 134, 109],\n",
       "       [113, 114, 144],\n",
       "       [ 98, 126,  91],\n",
       "       [115,  99,  97],\n",
       "       [127, 148, 141],\n",
       "       [107, 112,  94],\n",
       "       [ 90, 125, 144],\n",
       "       [ 99, 132,  90],\n",
       "       [137, 103, 118],\n",
       "       [118, 111, 141],\n",
       "       [132, 131, 124],\n",
       "       [143,  97, 123],\n",
       "       [106, 138, 108],\n",
       "       [134, 149, 122],\n",
       "       [ 98,  99, 117],\n",
       "       [101, 112, 108],\n",
       "       [137, 133, 100],\n",
       "       [112,  93, 127],\n",
       "       [115,  98, 149],\n",
       "       [117,  97, 123],\n",
       "       [109,  98, 106],\n",
       "       [109, 135, 141],\n",
       "       [ 99,  92, 137],\n",
       "       [133, 145,  99],\n",
       "       [140, 147, 139],\n",
       "       [125, 119, 136],\n",
       "       [105, 118,  96],\n",
       "       [102,  97, 149],\n",
       "       [107, 105, 116],\n",
       "       [144, 148, 146],\n",
       "       [101, 144, 143],\n",
       "       [ 95, 111, 111],\n",
       "       [130, 124, 143],\n",
       "       [146,  94,  96],\n",
       "       [146, 118, 146],\n",
       "       [106, 115, 129],\n",
       "       [117, 129, 149],\n",
       "       [149, 115, 136],\n",
       "       [139, 106,  99],\n",
       "       [117, 104, 101],\n",
       "       [ 94,  98, 108],\n",
       "       [ 99, 123, 122],\n",
       "       [108, 144, 132],\n",
       "       [ 92, 100, 106],\n",
       "       [104, 145, 118],\n",
       "       [107, 142, 103],\n",
       "       [128, 126, 107],\n",
       "       [106, 130, 126],\n",
       "       [125, 145, 124],\n",
       "       [104,  95, 108],\n",
       "       [125,  95, 113],\n",
       "       [114,  98, 114],\n",
       "       [113, 117, 143],\n",
       "       [ 90,  95, 116],\n",
       "       [ 97, 125, 109],\n",
       "       [ 90, 116, 111],\n",
       "       [102, 147, 130],\n",
       "       [118, 107, 107],\n",
       "       [101, 119, 115],\n",
       "       [136,  92, 108],\n",
       "       [ 96, 125, 135],\n",
       "       [145, 104, 148],\n",
       "       [123, 137, 109],\n",
       "       [125, 141, 141],\n",
       "       [ 95, 144, 114],\n",
       "       [134,  92, 115],\n",
       "       [ 93, 148, 113],\n",
       "       [ 91, 105, 138],\n",
       "       [109,  91, 106],\n",
       "       [117, 116, 138],\n",
       "       [128,  92,  99],\n",
       "       [129, 101, 128],\n",
       "       [108, 143,  97],\n",
       "       [116, 146, 108],\n",
       "       [130, 108, 149],\n",
       "       [137, 140, 148],\n",
       "       [139, 122, 101],\n",
       "       [129, 143, 127],\n",
       "       [130,  98, 102],\n",
       "       [ 96,  95, 103],\n",
       "       [108, 135, 122],\n",
       "       [100, 113, 120],\n",
       "       [143, 101, 122],\n",
       "       [118, 142, 126],\n",
       "       [143, 117, 128],\n",
       "       [134, 140, 134],\n",
       "       [123, 126, 120],\n",
       "       [132, 103, 137],\n",
       "       [100, 118,  90],\n",
       "       [127, 133,  96],\n",
       "       [107, 102,  91],\n",
       "       [105, 149, 129],\n",
       "       [126, 129, 114],\n",
       "       [122, 135, 120],\n",
       "       [ 90, 140, 105],\n",
       "       [114, 131, 102],\n",
       "       [126, 134, 133],\n",
       "       [146, 137, 124],\n",
       "       [124, 126, 112],\n",
       "       [135, 115,  95],\n",
       "       [146, 119, 146],\n",
       "       [137, 141, 122],\n",
       "       [143, 132, 123],\n",
       "       [132, 144, 103],\n",
       "       [132, 148, 115],\n",
       "       [127, 141, 103],\n",
       "       [137, 101, 104],\n",
       "       [121,  97, 134],\n",
       "       [149, 144, 119],\n",
       "       [123, 142, 110],\n",
       "       [127, 109,  93],\n",
       "       [145, 136, 101],\n",
       "       [113, 147, 113],\n",
       "       [103, 116, 123],\n",
       "       [102, 131, 120],\n",
       "       [115, 115, 118],\n",
       "       [ 92, 124, 124],\n",
       "       [138, 123, 141],\n",
       "       [145, 119, 147],\n",
       "       [140, 111, 102],\n",
       "       [ 90, 139, 119],\n",
       "       [114, 110, 121],\n",
       "       [130, 103, 121],\n",
       "       [141, 117, 131],\n",
       "       [144, 118, 147],\n",
       "       [109,  99, 139],\n",
       "       [120, 144, 119],\n",
       "       [100, 136, 145],\n",
       "       [109, 109, 108],\n",
       "       [130, 145, 113],\n",
       "       [ 98, 127, 146],\n",
       "       [137, 110, 110],\n",
       "       [113, 136, 134],\n",
       "       [122, 100, 116],\n",
       "       [102, 109, 102],\n",
       "       [149, 138, 123],\n",
       "       [106, 147, 127],\n",
       "       [115, 138, 116],\n",
       "       [118, 138, 102],\n",
       "       [109, 105, 107],\n",
       "       [ 98, 127, 100],\n",
       "       [121, 142, 109],\n",
       "       [140,  96, 108],\n",
       "       [123, 119, 113],\n",
       "       [141, 136, 139],\n",
       "       [134, 130, 113],\n",
       "       [110, 117, 121],\n",
       "       [129, 119, 134],\n",
       "       [130, 125, 102],\n",
       "       [144, 123, 128],\n",
       "       [102, 140, 106],\n",
       "       [136, 111,  97],\n",
       "       [128, 125, 104],\n",
       "       [148, 131, 127],\n",
       "       [126, 131, 124],\n",
       "       [130,  94, 121],\n",
       "       [101, 123, 119],\n",
       "       [101, 102, 126],\n",
       "       [143, 100, 144],\n",
       "       [125,  94, 128],\n",
       "       [101, 147, 128],\n",
       "       [119, 100, 132],\n",
       "       [ 92, 119, 114],\n",
       "       [114, 149, 124],\n",
       "       [109, 123, 108],\n",
       "       [144, 110, 103],\n",
       "       [101, 110,  96],\n",
       "       [ 91, 143, 133],\n",
       "       [112, 103, 136],\n",
       "       [124, 106, 128],\n",
       "       [142, 121, 123],\n",
       "       [112, 127,  93],\n",
       "       [111, 106,  90],\n",
       "       [129, 129, 101],\n",
       "       [120, 143, 112],\n",
       "       [ 90, 130, 102],\n",
       "       [113, 132, 146],\n",
       "       [ 98, 123, 128],\n",
       "       [126, 128, 143],\n",
       "       [143, 117, 148],\n",
       "       [137, 110, 135],\n",
       "       [131, 103, 116],\n",
       "       [106, 133, 100],\n",
       "       [122,  92, 100],\n",
       "       [134, 138, 102],\n",
       "       [129, 130, 118],\n",
       "       [136,  92, 140],\n",
       "       [148, 141, 125],\n",
       "       [130, 142, 121],\n",
       "       [131, 144, 120],\n",
       "       [114,  93, 138],\n",
       "       [108, 101, 109],\n",
       "       [139,  91, 116],\n",
       "       [145, 134, 139],\n",
       "       [101, 139, 116],\n",
       "       [116, 113, 147],\n",
       "       [138, 144, 112],\n",
       "       [108, 135, 105],\n",
       "       [135, 121, 110],\n",
       "       [ 98, 132, 119],\n",
       "       [ 93, 120, 149],\n",
       "       [142, 149, 136],\n",
       "       [138, 116, 111],\n",
       "       [100, 132, 146],\n",
       "       [137, 115,  91],\n",
       "       [ 97, 141, 107],\n",
       "       [137, 134, 116],\n",
       "       [123, 105, 105],\n",
       "       [101, 128, 107],\n",
       "       [142, 141, 134],\n",
       "       [ 95,  91, 118],\n",
       "       [119, 120, 148],\n",
       "       [104, 135, 127],\n",
       "       [134, 103, 121],\n",
       "       [146, 109, 109],\n",
       "       [130, 144, 148],\n",
       "       [100, 116, 107],\n",
       "       [143,  91,  97],\n",
       "       [ 97, 125, 129],\n",
       "       [108, 129, 107],\n",
       "       [ 93, 124, 109],\n",
       "       [117, 148, 105],\n",
       "       [113,  90, 146]])"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = np.random.randint(90, 150, size=(50, 3)) \n",
    "b = np.random.randint(90, 150, size=(50, 3)) \n",
    "c = np.random.randint(90, 150, size=(50, 3)) \n",
    "d = np.random.randint(90, 150, size=(50, 3)) \n",
    "e = np.random.randint(90, 150, size=(50, 3)) \n",
    "f = np.random.randint(90, 150, size=(50, 3))\n",
    "score = np.concatenate([a, b, c, d, e, f])\n",
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4e80bff3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2],\n",
       "       [2],\n",
       "       [1],\n",
       "       [1],\n",
       "       [1],\n",
       "       [2]])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sex = np.random.randint(1, 3, size=(300, 1))\n",
    "sex"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "004308ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143, 120, 135,   1],\n",
       "       [ 90, 147,  98,   1],\n",
       "       [127, 140, 135,   1],\n",
       "       ...,\n",
       "       [ 93, 124, 109,   1],\n",
       "       [117, 148, 105,   1],\n",
       "       [113,  90, 146,   2]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# data = np.concatenate([score,sex],axis=1)\n",
    "# or\n",
    "data = np.hstack([score, sex])\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "4ca7b5f3",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ True,  True,  True, False,  True,  True,  True,  True,  True,\n",
       "       False,  True, False,  True,  True, False, False,  True, False,\n",
       "       False, False,  True, False, False,  True, False,  True, False,\n",
       "       False,  True,  True, False,  True, False, False, False, False,\n",
       "        True, False,  True,  True,  True,  True,  True, False, False,\n",
       "        True,  True, False, False,  True,  True, False,  True,  True,\n",
       "       False,  True,  True, False,  True,  True,  True, False, False,\n",
       "        True,  True,  True, False,  True,  True,  True,  True, False,\n",
       "        True,  True, False,  True,  True,  True, False,  True,  True,\n",
       "       False,  True,  True,  True,  True, False, False,  True, False,\n",
       "       False,  True,  True,  True,  True, False, False, False, False,\n",
       "       False, False, False, False,  True, False, False,  True,  True,\n",
       "        True,  True, False, False,  True, False, False, False,  True,\n",
       "        True, False,  True,  True,  True,  True,  True,  True,  True,\n",
       "       False, False,  True,  True,  True,  True,  True, False,  True,\n",
       "        True, False, False, False,  True,  True, False,  True,  True,\n",
       "        True, False, False,  True,  True, False, False, False, False,\n",
       "       False,  True, False,  True, False, False,  True,  True,  True,\n",
       "        True, False, False,  True, False, False,  True,  True, False,\n",
       "        True,  True,  True, False, False,  True, False, False, False,\n",
       "       False,  True, False, False, False,  True, False, False, False,\n",
       "       False, False,  True, False,  True,  True, False,  True, False,\n",
       "       False, False, False, False, False,  True,  True,  True, False,\n",
       "        True,  True,  True,  True, False,  True, False,  True, False,\n",
       "       False, False, False, False, False, False, False, False,  True,\n",
       "        True, False, False, False, False, False,  True, False, False,\n",
       "       False, False, False,  True,  True,  True,  True,  True, False,\n",
       "       False,  True,  True,  True, False, False,  True, False, False,\n",
       "        True,  True, False, False,  True,  True,  True, False, False,\n",
       "        True, False, False, False,  True,  True,  True, False, False,\n",
       "        True,  True,  True, False, False, False,  True,  True, False,\n",
       "       False, False,  True, False,  True, False, False,  True,  True,\n",
       "       False,  True, False,  True,  True,  True, False, False,  True,\n",
       "        True,  True, False])"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 分别计算男女生各科成绩统计指标：最小值、最大值、平均分、中位数、标准差\n",
    "# 1：男生 2：女生，值可替换\n",
    "con1 = data == 1\n",
    "con2 = con1[:, 0] + con1[:, 1] + con1[:, 2] + con1[:, 3] \n",
    "con2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "3ac71037",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143, 120, 135,   1],\n",
       "       [ 90, 147,  98,   1],\n",
       "       [127, 140, 135,   1],\n",
       "       [134,  95, 144,   1],\n",
       "       [132, 109, 134,   1],\n",
       "       [129,  94, 100,   1],\n",
       "       [134, 134, 121,   1],\n",
       "       [113,  96, 147,   1],\n",
       "       [147, 106, 146,   1],\n",
       "       [117, 119, 149,   1],\n",
       "       [105, 125, 104,   1],\n",
       "       [130, 135,  92,   1],\n",
       "       [116,  97, 112,   1],\n",
       "       [109, 111, 124,   1],\n",
       "       [109, 105, 136,   1],\n",
       "       [104, 117, 119,   1],\n",
       "       [138, 136, 124,   1],\n",
       "       [114,  92,  91,   1],\n",
       "       [ 94,  96, 129,   1],\n",
       "       [108, 118, 125,   1],\n",
       "       [120, 115, 130,   1],\n",
       "       [144, 121, 143,   1],\n",
       "       [133, 121, 117,   1],\n",
       "       [134, 116, 141,   1],\n",
       "       [117,  96,  94,   1],\n",
       "       [109, 137, 124,   1],\n",
       "       [138, 127, 114,   1],\n",
       "       [136, 140,  92,   1],\n",
       "       [115,  92, 102,   1],\n",
       "       [104, 113, 112,   1],\n",
       "       [135, 118, 128,   1],\n",
       "       [136, 144,  98,   1],\n",
       "       [103, 101, 103,   1],\n",
       "       [106,  92,  97,   1],\n",
       "       [133,  98, 141,   1],\n",
       "       [143, 144,  91,   1],\n",
       "       [ 96,  99, 136,   1],\n",
       "       [ 93, 138, 132,   1],\n",
       "       [101, 116, 134,   1],\n",
       "       [147, 138, 134,   1],\n",
       "       [ 95, 139, 105,   1],\n",
       "       [127,  90, 120,   1],\n",
       "       [124, 116,  91,   1],\n",
       "       [141,  93,  97,   1],\n",
       "       [114, 144, 110,   1],\n",
       "       [119, 107, 130,   1],\n",
       "       [136, 134, 109,   1],\n",
       "       [ 98, 126,  91,   1],\n",
       "       [115,  99,  97,   1],\n",
       "       [107, 112,  94,   1],\n",
       "       [ 90, 125, 144,   1],\n",
       "       [ 99, 132,  90,   1],\n",
       "       [137, 103, 118,   1],\n",
       "       [143,  97, 123,   1],\n",
       "       [ 98,  99, 117,   1],\n",
       "       [101, 112, 108,   1],\n",
       "       [137, 133, 100,   1],\n",
       "       [112,  93, 127,   1],\n",
       "       [105, 118,  96,   1],\n",
       "       [144, 148, 146,   1],\n",
       "       [101, 144, 143,   1],\n",
       "       [ 95, 111, 111,   1],\n",
       "       [130, 124, 143,   1],\n",
       "       [106, 115, 129,   1],\n",
       "       [117, 104, 101,   1],\n",
       "       [ 94,  98, 108,   1],\n",
       "       [108, 144, 132,   1],\n",
       "       [ 92, 100, 106,   1],\n",
       "       [104, 145, 118,   1],\n",
       "       [107, 142, 103,   1],\n",
       "       [128, 126, 107,   1],\n",
       "       [106, 130, 126,   1],\n",
       "       [125, 145, 124,   1],\n",
       "       [114,  98, 114,   1],\n",
       "       [113, 117, 143,   1],\n",
       "       [ 90,  95, 116,   1],\n",
       "       [ 97, 125, 109,   1],\n",
       "       [ 90, 116, 111,   1],\n",
       "       [118, 107, 107,   1],\n",
       "       [101, 119, 115,   1],\n",
       "       [123, 137, 109,   1],\n",
       "       [125, 141, 141,   1],\n",
       "       [134,  92, 115,   1],\n",
       "       [ 93, 148, 113,   1],\n",
       "       [ 91, 105, 138,   1],\n",
       "       [128,  92,  99,   1],\n",
       "       [129, 101, 128,   1],\n",
       "       [129, 143, 127,   1],\n",
       "       [ 96,  95, 103,   1],\n",
       "       [143, 101, 122,   1],\n",
       "       [118, 142, 126,   1],\n",
       "       [143, 117, 128,   1],\n",
       "       [134, 140, 134,   1],\n",
       "       [100, 118,  90,   1],\n",
       "       [105, 149, 129,   1],\n",
       "       [126, 129, 114,   1],\n",
       "       [ 90, 140, 105,   1],\n",
       "       [114, 131, 102,   1],\n",
       "       [126, 134, 133,   1],\n",
       "       [135, 115,  95,   1],\n",
       "       [132, 148, 115,   1],\n",
       "       [149, 144, 119,   1],\n",
       "       [102, 131, 120,   1],\n",
       "       [ 92, 124, 124,   1],\n",
       "       [138, 123, 141,   1],\n",
       "       [140, 111, 102,   1],\n",
       "       [120, 144, 119,   1],\n",
       "       [100, 136, 145,   1],\n",
       "       [109, 109, 108,   1],\n",
       "       [ 98, 127, 146,   1],\n",
       "       [137, 110, 110,   1],\n",
       "       [113, 136, 134,   1],\n",
       "       [122, 100, 116,   1],\n",
       "       [149, 138, 123,   1],\n",
       "       [115, 138, 116,   1],\n",
       "       [129, 119, 134,   1],\n",
       "       [130, 125, 102,   1],\n",
       "       [126, 131, 124,   1],\n",
       "       [101, 147, 128,   1],\n",
       "       [119, 100, 132,   1],\n",
       "       [ 92, 119, 114,   1],\n",
       "       [114, 149, 124,   1],\n",
       "       [109, 123, 108,   1],\n",
       "       [ 91, 143, 133,   1],\n",
       "       [112, 103, 136,   1],\n",
       "       [124, 106, 128,   1],\n",
       "       [111, 106,  90,   1],\n",
       "       [ 90, 130, 102,   1],\n",
       "       [113, 132, 146,   1],\n",
       "       [143, 117, 148,   1],\n",
       "       [137, 110, 135,   1],\n",
       "       [131, 103, 116,   1],\n",
       "       [134, 138, 102,   1],\n",
       "       [130, 142, 121,   1],\n",
       "       [131, 144, 120,   1],\n",
       "       [114,  93, 138,   1],\n",
       "       [145, 134, 139,   1],\n",
       "       [101, 139, 116,   1],\n",
       "       [116, 113, 147,   1],\n",
       "       [ 98, 132, 119,   1],\n",
       "       [ 93, 120, 149,   1],\n",
       "       [137, 115,  91,   1],\n",
       "       [137, 134, 116,   1],\n",
       "       [142, 141, 134,   1],\n",
       "       [ 95,  91, 118,   1],\n",
       "       [104, 135, 127,   1],\n",
       "       [146, 109, 109,   1],\n",
       "       [130, 144, 148,   1],\n",
       "       [100, 116, 107,   1],\n",
       "       [108, 129, 107,   1],\n",
       "       [ 93, 124, 109,   1],\n",
       "       [117, 148, 105,   1]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "(152, 4)"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "s_score = data[con2] \n",
    "display(s_score, s_score.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "1b6534ad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[143, 120, 135],\n",
       "       [ 90, 147,  98],\n",
       "       [127, 140, 135],\n",
       "       [134,  95, 144],\n",
       "       [132, 109, 134],\n",
       "       [129,  94, 100],\n",
       "       [134, 134, 121],\n",
       "       [113,  96, 147],\n",
       "       [147, 106, 146],\n",
       "       [117, 119, 149],\n",
       "       [105, 125, 104],\n",
       "       [130, 135,  92],\n",
       "       [116,  97, 112],\n",
       "       [109, 111, 124],\n",
       "       [109, 105, 136],\n",
       "       [104, 117, 119],\n",
       "       [138, 136, 124],\n",
       "       [114,  92,  91],\n",
       "       [ 94,  96, 129],\n",
       "       [108, 118, 125],\n",
       "       [120, 115, 130],\n",
       "       [144, 121, 143],\n",
       "       [133, 121, 117],\n",
       "       [134, 116, 141],\n",
       "       [117,  96,  94],\n",
       "       [109, 137, 124],\n",
       "       [138, 127, 114],\n",
       "       [136, 140,  92],\n",
       "       [115,  92, 102],\n",
       "       [104, 113, 112],\n",
       "       [135, 118, 128],\n",
       "       [136, 144,  98],\n",
       "       [103, 101, 103],\n",
       "       [106,  92,  97],\n",
       "       [133,  98, 141],\n",
       "       [143, 144,  91],\n",
       "       [ 96,  99, 136],\n",
       "       [ 93, 138, 132],\n",
       "       [101, 116, 134],\n",
       "       [147, 138, 134],\n",
       "       [ 95, 139, 105],\n",
       "       [127,  90, 120],\n",
       "       [124, 116,  91],\n",
       "       [141,  93,  97],\n",
       "       [114, 144, 110],\n",
       "       [119, 107, 130],\n",
       "       [136, 134, 109],\n",
       "       [ 98, 126,  91],\n",
       "       [115,  99,  97],\n",
       "       [107, 112,  94],\n",
       "       [ 90, 125, 144],\n",
       "       [ 99, 132,  90],\n",
       "       [137, 103, 118],\n",
       "       [143,  97, 123],\n",
       "       [ 98,  99, 117],\n",
       "       [101, 112, 108],\n",
       "       [137, 133, 100],\n",
       "       [112,  93, 127],\n",
       "       [105, 118,  96],\n",
       "       [144, 148, 146],\n",
       "       [101, 144, 143],\n",
       "       [ 95, 111, 111],\n",
       "       [130, 124, 143],\n",
       "       [106, 115, 129],\n",
       "       [117, 104, 101],\n",
       "       [ 94,  98, 108],\n",
       "       [108, 144, 132],\n",
       "       [ 92, 100, 106],\n",
       "       [104, 145, 118],\n",
       "       [107, 142, 103],\n",
       "       [128, 126, 107],\n",
       "       [106, 130, 126],\n",
       "       [125, 145, 124],\n",
       "       [114,  98, 114],\n",
       "       [113, 117, 143],\n",
       "       [ 90,  95, 116],\n",
       "       [ 97, 125, 109],\n",
       "       [ 90, 116, 111],\n",
       "       [118, 107, 107],\n",
       "       [101, 119, 115],\n",
       "       [123, 137, 109],\n",
       "       [125, 141, 141],\n",
       "       [134,  92, 115],\n",
       "       [ 93, 148, 113],\n",
       "       [ 91, 105, 138],\n",
       "       [128,  92,  99],\n",
       "       [129, 101, 128],\n",
       "       [129, 143, 127],\n",
       "       [ 96,  95, 103],\n",
       "       [143, 101, 122],\n",
       "       [118, 142, 126],\n",
       "       [143, 117, 128],\n",
       "       [134, 140, 134],\n",
       "       [100, 118,  90],\n",
       "       [105, 149, 129],\n",
       "       [126, 129, 114],\n",
       "       [ 90, 140, 105],\n",
       "       [114, 131, 102],\n",
       "       [126, 134, 133],\n",
       "       [135, 115,  95],\n",
       "       [132, 148, 115],\n",
       "       [149, 144, 119],\n",
       "       [102, 131, 120],\n",
       "       [ 92, 124, 124],\n",
       "       [138, 123, 141],\n",
       "       [140, 111, 102],\n",
       "       [120, 144, 119],\n",
       "       [100, 136, 145],\n",
       "       [109, 109, 108],\n",
       "       [ 98, 127, 146],\n",
       "       [137, 110, 110],\n",
       "       [113, 136, 134],\n",
       "       [122, 100, 116],\n",
       "       [149, 138, 123],\n",
       "       [115, 138, 116],\n",
       "       [129, 119, 134],\n",
       "       [130, 125, 102],\n",
       "       [126, 131, 124],\n",
       "       [101, 147, 128],\n",
       "       [119, 100, 132],\n",
       "       [ 92, 119, 114],\n",
       "       [114, 149, 124],\n",
       "       [109, 123, 108],\n",
       "       [ 91, 143, 133],\n",
       "       [112, 103, 136],\n",
       "       [124, 106, 128],\n",
       "       [111, 106,  90],\n",
       "       [ 90, 130, 102],\n",
       "       [113, 132, 146],\n",
       "       [143, 117, 148],\n",
       "       [137, 110, 135],\n",
       "       [131, 103, 116],\n",
       "       [134, 138, 102],\n",
       "       [130, 142, 121],\n",
       "       [131, 144, 120],\n",
       "       [114,  93, 138],\n",
       "       [145, 134, 139],\n",
       "       [101, 139, 116],\n",
       "       [116, 113, 147],\n",
       "       [ 98, 132, 119],\n",
       "       [ 93, 120, 149],\n",
       "       [137, 115,  91],\n",
       "       [137, 134, 116],\n",
       "       [142, 141, 134],\n",
       "       [ 95,  91, 118],\n",
       "       [104, 135, 127],\n",
       "       [146, 109, 109],\n",
       "       [130, 144, 148],\n",
       "       [100, 116, 107],\n",
       "       [108, 129, 107],\n",
       "       [ 93, 124, 109],\n",
       "       [117, 148, 105]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "s_score = s_score[:, 0:-1]\n",
    "display(s_score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "4ae589fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([90, 90, 90])"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最小值\n",
    "# min_score = s_score.min(axis=0)\n",
    "# or\n",
    "min_score = np.min(s_score, axis = 0)\n",
    "min_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "cb8ffa1d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([149, 149, 149])"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 最大值\n",
    "# max_score = s_score.max(axis=0)\n",
    "# or\n",
    "max_score = np.max(s_score, axis = 0)\n",
    "max_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "c02fb387",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([117.46710526, 120.89473684, 119.19736842])"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 平均分\n",
    "# mean_score = s_score.mean(axis=0)\n",
    "# or\n",
    "mean_score = np.mean(s_score, axis=0)\n",
    "mean_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "1feecd74",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([116., 120., 119.])"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 中位数\n",
    "median_score = np.median(s_score, axis=0)\n",
    "median_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "id": "e4a623bd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([17.08874582, 17.46656878, 16.33813728])"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 标准差\n",
    "# std_score = s_score.std(axis=0)\n",
    "# or\n",
    "std_score = np.std(s_score, axis=0)\n",
    "std_score"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
